<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .one{
            width:400px;
            height:400px;
            background-color: yellow;
        }
        .two{
            width:800px;
            height:800px;
            background-color: red;
            background-image:url("1.jpg");
            background-repeat: repeat-y;
            background-position: center top;
            background-size:contain;

        }
    </style>
</head>
<body>
    <div class="one"></div>
    <div class="two"></div>
</body>
</html>